From 7baa69e977aea8a26974dc01d63d5c36b8ed53ac Mon Sep 17 00:00:00 2001 From: "cl349@arcadians.cl.cam.ac.uk" Date: Fri, 26 Nov 2004 18:24:37 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.464 (41a774e5uWbYah9_JbijJTJdy5AciQ) physdev.c: Support io bitmaps on vcpu's. --- xen/common/physdev.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/xen/common/physdev.c b/xen/common/physdev.c index 95d5063954..d2811f2a73 100644 --- a/xen/common/physdev.c +++ b/xen/common/physdev.c @@ -125,10 +125,10 @@ int physdev_pci_access_modify( domid_t dom, int bus, int dev, int func, int enable) { struct domain *p; - struct exec_domain *ed; + struct exec_domain *ed, *edc; struct pci_dev *pdev; int i, j, rc = 0; - + if ( !IS_PRIV(current->domain) ) BUG(); @@ -182,6 +182,12 @@ int physdev_pci_access_modify( memset(ed->thread.io_bitmap, 0xFF, IOBMP_BYTES); ed->thread.io_bitmap_sel = ~0ULL; + + for_each_exec_domain(p, edc) { + if (edc == ed) + continue; + edc->thread.io_bitmap = ed->thread.io_bitmap; + } } for ( i = 0; i < DEVICE_COUNT_RESOURCE; i++ ) @@ -205,6 +211,13 @@ int physdev_pci_access_modify( /* rights to IO memory regions are checked when the domain maps them */ } + + for_each_exec_domain(p, edc) { + if (edc == ed) + continue; + edc->thread.io_bitmap_sel = ed->thread.io_bitmap_sel; + } + out: put_domain(p); return rc; -- 2.30.2